// Tests if @win should be shown in the Overview
_isOverviewWindow : function (win) {
- let wintype = win.get_window_type();
- if (wintype == Meta.WindowType.DESKTOP ||
- wintype == Meta.WindowType.DOCK)
- return false;
- return !win.is_override_redirect();
+ let appMon = Shell.AppMonitor.get_default()
+ return appMon.is_window_usage_tracked(win.get_meta_window());
},
_createWindowIcon: function(window) {
}
/**
- * window_is_usage_tracked:
+ * shell_app_monitor_is_window_usage_tracked:
*
* Determine if it makes sense to track the given window for application
* usage. An example of a window we don't want to track is the root
*
* Returns: %TRUE iff we want to record focus time spent in this window
*/
-static gboolean
-window_is_usage_tracked (MetaWindow *window)
+gboolean
+shell_app_monitor_is_window_usage_tracked (MetaWindow *window)
{
if (!window_is_tracked (window))
return FALSE;
display = meta_screen_get_display (screen);
window = meta_display_get_focus_window (display);
- if (window != NULL && window_is_usage_tracked (window))
+ if (window != NULL && shell_app_monitor_is_window_usage_tracked (window))
return window;
return NULL;
}
* tracked it doesn't count for the purposes of an application
* running.
*/
- if (!window_is_usage_tracked (window))
+ if (!shell_app_monitor_is_window_usage_tracked (window))
return;
usage = get_app_usage_from_window (self, window);
if (window == self->watched_window)
self->watched_window = NULL;
- if (window_is_usage_tracked (window))
+ if (shell_app_monitor_is_window_usage_tracked (window))
{
AppUsage *usage;
const char *context;
ShellAppInfo *app = value;
const char *id = shell_app_info_get_id (app);
- if (!window_is_usage_tracked (window))
+ if (!shell_app_monitor_is_window_usage_tracked (window))
continue;
if (strcmp (id, appid) != 0)
if (strcmp (get_window_context (window), context) != 0)
continue;
- if (!window_is_usage_tracked (window))
+ if (!shell_app_monitor_is_window_usage_tracked (window))
continue;
id = shell_app_info_get_id (app);
GSList *shell_app_monitor_get_windows_for_app (ShellAppMonitor *monitor, const char *appid);
+gboolean shell_app_monitor_is_window_usage_tracked (MetaWindow *window);
+
/* Get whatever's running right now */
GSList *shell_app_monitor_get_running_apps (ShellAppMonitor *monitor, const char *context);